From: Jeroen van der Heijden Date: Wed, 26 Sep 2018 10:14:08 +0000 (+0200) Subject: . X-Git-Tag: archive/raspbian/2.0.44-1+rpi1~1^2~3^2~8^2~68 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=bd0fe6eaa98f03f47a34181b596cab90aa1eac60;p=siridb-server.git . --- diff --git a/.travis.yml b/.travis.yml index 12900d6b..c18951ab 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,5 +28,6 @@ matrix: - sudo make install - cd ../../ script: - - splint *.c + - make test + - CFLAGS="-Werror -std=gnu89" && make diff --git a/Debug/makefile b/Debug/makefile index c1b0a2dd..016c2064 100644 --- a/Debug/makefile +++ b/Debug/makefile @@ -51,14 +51,14 @@ endif OS := $(shell uname) ifeq ($(OS),Darwin) -CRYPT := +CRYPT := UUID := else CRYPT := -lcrypt UUID := -luuid endif -# Add inputs and outputs from these tool invocations to the build variables +# Add inputs and outputs from these tool invocations to the build variables # All Target all: siridb-server @@ -80,3 +80,6 @@ clean: .SECONDARY: -include ../makefile.targets + +test: + -@cd ../test && ./test.sh \ No newline at end of file diff --git a/Release/makefile b/Release/makefile index 945fa244..16b41bca 100644 --- a/Release/makefile +++ b/Release/makefile @@ -51,14 +51,14 @@ endif OS := $(shell uname) ifeq ($(OS),Darwin) -CRYPT := +CRYPT := UUID := else CRYPT := -lcrypt UUID := -luuid endif -# Add inputs and outputs from these tool invocations to the build variables +# Add inputs and outputs from these tool invocations to the build variables # All Target all: siridb-server @@ -67,7 +67,7 @@ all: siridb-server siridb-server: $(OBJS) $(USER_OBJS) @echo 'Building target: $@' @echo 'Invoking: GCC C Linker' - gcc -o "siridb-server" $(OBJS) $(USER_OBJS) $(LDFLAGS) $(LIBS) $(CRYPT) $(UUID) + gcc -o "siridb-server" $(OBJS) $(USER_OBJS) $(LDFLAGS) $(LIBS) $(CRYPT) $(UUID) @echo 'Finished building target: $@' @echo ' ' @@ -80,3 +80,6 @@ clean: .SECONDARY: -include ../makefile.targets + +test: + -@cd ../test && ./test.sh \ No newline at end of file diff --git a/include/imap/imap.h b/include/imap/imap.h index 42e92d71..339f30cc 100644 --- a/include/imap/imap.h +++ b/include/imap/imap.h @@ -30,7 +30,7 @@ typedef void (*imap_update_cb)( imap_t * imap_new(void); void imap_free(imap_t * imap, imap_free_cb cb); int imap_set(imap_t * imap, uint64_t id, void * data); -int imap_add(imap_t * imap, uint64_t id, void * data); +unsigned int imap_add(imap_t * imap, uint64_t id, void * data); void * imap_get(imap_t * imap, uint64_t id); void * imap_pop(imap_t * imap, uint64_t id); int imap_walk(imap_t * imap, imap_cb cb, void * data); diff --git a/makefile.init b/makefile.init deleted file mode 100644 index de39f397..00000000 --- a/makefile.init +++ /dev/null @@ -1,2 +0,0 @@ -test: - @cd ../test && ./test.sh diff --git a/src/imap/imap.c b/src/imap/imap.c index 7271c9b6..0fc56b34 100644 --- a/src/imap/imap.c +++ b/src/imap/imap.c @@ -158,7 +158,7 @@ int imap_set(imap_t * imap, uint64_t id, void * data) * In case of a memory error we return -1. When the id already exists -2 will * be returned. */ -int imap_add(imap_t * imap, uint64_t id, void * data) +unsigned int imap_add(imap_t * imap, uint64_t id, void * data) { #if DEBUG /* insert NULL is not allowed */